<div style="margin-top:0;-moz-border-radius:6px; -moz-box-shadow: 1px 1px 3px #777777; border: 1px solid #C0C4C6; color: #000000; padding: 10px; padding-bottom: 0; background-color: #FFFFFF;margin-right: 2em; ">
	<div style="text-align:right; background-color: #FFFFFF;">
		<%= link_to image_tag("close.gif", :alt => "Close login box"), "#", :onclick => "closePopup('login_box'); return false;" %>
	</div>
	<center>
      <div class="contents">
        <% form_tag session_path do %>
          <%= hidden_field_tag "called_from[controller]", controller.controller_name -%>
          <%= hidden_field_tag "called_from[action]", controller.action_name -%>
          <%= hidden_field_tag "called_from[id]", params[:id] -%>
          <% if params[:entry_ids] -%>
            <%= hidden_field_tag "called_from[entry_ids]", params[:entry_ids].join(",").to_s -%>
            <%= hidden_field_tag "called_from[survey_search_query]", params[:survey_search_query] -%>
          <% end -%>

          <div class="box1">
            <p style="font-size:1em;font-family:'Trebuchet MS',Arial,Helvetica,Verdana,sans-serif;">
              Email:
            </p>
            <% params[:survey_search_query] %>
            <p>
              <%= text_field_tag 'login', nil, :class => 'field', :style => "width: 140px;" %>
            </p>
            <p style="font-size:1em;font-family:'Trebuchet MS',Arial,Helvetica,Verdana,sans-serif;">
                  Password:
            </p>
            <p>
              <%= password_field_tag 'password', nil, :class => 'field', :style => "width: 140px;" %>
            </p>

            <p style="font-size:1em;font-family:'Trebuchet MS',Arial,Helvetica,Verdana,sans-serif;">
              Remember me: <%= check_box_tag 'remember_me' %>
            </p>


          </div>

          <p>
            <%= submit_tag "Log in", :disable_with => "Logging in..." %>
          </p>

        <% end %>
        <%# if !REGISTRATION_CLOSED -%>
          <!-- <p style="margin-top: 0.6em; line-height: 1.3em; font-size:1em;font-family:'Trebuchet MS',Arial,Helvetica,Verdana,sans-serif;"> -->
            <!-- <b>Need an account?</b><br /> -->
            <!-- <b> -->
<%#= link_to "Sign up", signup_url %>
<!-- </b> -->
          <!-- </p> -->
        <%# else -%>
          <!-- <p style="margin-top: 0.6em; line-height: 1.3em; font-size:1em;font-family:'Trebuchet MS',Arial,Helvetica,Verdana,sans-serif;"> -->
            <!-- <b>New user registration is currently closed</b> -->
          <!-- </p> -->
        <%# end -%>
        <br/>
        <p style="margin-top: 0.6em; line-height: 1.3em; font-size:1em;font-family:'Trebuchet MS',Arial,Helvetica,Verdana,sans-serif;">
          <b><%= link_to "Forgotten password?", forgot_password_url %></b>
        </p>

      </div>
  </center>
</div>